import React from 'react'
import { Button, Form, Input, Modal } from 'antd';
function Edit({ onsubmit, form, falsexx, titles, open }) {

  const onFinish = (values) => {
    onsubmit(values)
  }
  return (
    <div>
      <Modal
        title={titles}
        // onsubmit={onsubmit}
        open={open}
        footer={null}
        onCancel={falsexx}
      >
        <Form
          form={form}
          name="basic"
          labelCol={{ span: 8 }}
          wrapperCol={{ span: 16 }}
          style={{ maxWidth: 600 }}
          initialValues={{ remember: true }}
          onFinish={onFinish}

        >
          <Form.Item
            label="姓名"
            name="name"
            rules={[{ required: true, message: 'Please input your username!' }]}
          >
            <Input />
          </Form.Item>

          <Form.Item
            label="职位"
            name="job"
            rules={[{ required: true, message: 'Please input your password!' }]}
          >
            <Input />
          </Form.Item>


          <Form.Item label={null}>
            <Button type="primary" htmlType="submit">
              提交
            </Button>
          </Form.Item>
        </Form>
      </Modal>
    </div>
  )
}

export default React.memo(Edit)
